﻿using HECore.Common.Entitys;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HECore.Tenant.Repository.Entites
{
    /// <summary>
    /// 租户表
    /// </summary>
    [Comment("租户表")]
    public class Tenant
    {
        /// <summary>
        /// 租户ID
        /// </summary>
        [Key]
        [Comment("租户ID")]
        public Guid Id { get; set; }

        /// <summary>
        /// 租户名称
        /// </summary>
        [Comment("租户名称")]
        [Required]
        [MaxLength(55)]
        public string Name { get; set; }

        /// <summary>
        /// 租户Logo
        /// </summary>
        [Comment("租户Logo")]
        [MaxLength(255)]
        public string Logo { get; set; }

        /// <summary>
        /// 创建员工
        /// </summary>
        [Comment("创建员工")]
        public Guid CreatorEmployeeId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        [Column(TypeName = "datetime")]
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 最后修改员工
        /// </summary>
        [Comment("最后修改员工")]
        public Guid? ModifiedEmployeeId { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        [Comment("最后修改时间")]
        [Column(TypeName = "datetime")]
        public DateTime? ModifiedTime { get; set; }

        /// <summary>
        /// 是否逻辑删除
        /// </summary>
        [Comment("是否逻辑删除")]
        public bool IsDelete { get; set; }

        /// <summary>
        /// 删除员工
        /// </summary>
        [Comment("删除员工")]
        public Guid? DeleterEmployeeId { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Comment("删除时间")]
        [Column(TypeName = "datetime")]
        public DateTime? DeletionTime { get; set; }
    }
}
